package adv3;

import adv2.Teacher;

import java.util.HashSet;
import java.util.Set;

/**
 * @author oldliu
 * @since 1.0
 */
public class SetTest2 {
    public static void main(String[] args) {
        Set<Teacher> s=new HashSet<>();
        s.add(new Teacher("老吴",22,"化学"));
        s.add(new Teacher("老张",23,"生物"));
        s.add(new Teacher("小李",42,"物理"));
        s.add(new Teacher("于七",29,"数学"));
        boolean b= s.add(new Teacher("于七",59,"数学"));
        System.out.println(b);
        System.out.println(s.size());
        for(Teacher t:s){
            System.out.println(t);
        }
    }
}
